<template>
 <t-image-viewer v-if="!store.isMobileType" v-model:visible="ImgVisible" :images="[urls + props.info.value]">
      </t-image-viewer>
      <van-image-preview :show-index="false" v-else v-model:show="ImgVisible" :images="[urls + props.info.value]">
      </van-image-preview>
  <div class="outline-parent jy-style-height">
    <div class="flex-box">
     
      <t-popup
        class="placement bottom center"
        attach="#attach"
        content="查看本单元全景展厅"
        placement="bottom"
        showArrow
        destroyOnClose
      >
        <img
          v-if="props.info.digitalShowroom"
          class="icon-3d blinking-animation-style"
          id="outlineIcon"
          @click="open(props.info.digitalShowroom)"
          :src="publicUrls + 'free/style1/3dIcon.png'"
        />
      </t-popup>
      <img
        class="outline-parent-bg"
        :src="publicUrls + 'free/style1/Level2outlinestyle3Bg.webp'"
        alt=""
      />
      <div class="outline border-hover-style">
        <div
          class="outline-content"
          :style="!props.info.subTitle && !props.info.remarks && { justifyContent: 'center' }"
        >
          <div class="content-tiitle">
            <span>{{ props.info.text }}</span>
          </div>
          <p class="outline-subTitle" v-if="props.info.subTitle">——{{ props.info.subTitle }}</p>
          <img
            v-if="props.info.value"
            class="outline-cover"
            @click="ImgVisible = true"
            :src="urls + props.info.value + '?imageView2/3/w/600/h/600/format/webp'"
            :class="{ '': !props.info.subTitle && !props.info.remarks }"
            alt=""
          />
          <TextMax
            v-if="props.domShow"
            :data="props.info.remarks"
            :title="props.info.text"
            :row="props.info.value ? 5 : 16"
          ></TextMax>
        </div>
      </div>
    </div>
  </div>
</template> 

<script lang="ts">
export default defineComponent({
  name: 'style3',
});
</script>

<script setup lang="ts">
import { publicUrls } from '@/utils/minxin';
import textMode from '../../../textMode/textMode.vue';
import { urls } from '@/utils/request/upload';
import TextMax from '@/freeComponents/textMode/TextMax.vue';
import { defineComponent, ref } from 'vue';
import { useProjectStore } from '@/store';
const store = useProjectStore();

const ImgVisible = ref(false);

const props = defineProps({
  info: {
    type: Object,
  },
  domShow: {
    type: Boolean,
  },
});

// 跳转全景链接
const open = (url: any) => {
  if (url) {
    window.open(url, '_blank');
  }
};
</script>

<style scoped lang="less">
.outline-parent {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  position: relative;
  margin-right: 280px;
}
.flex-box {
  width: 456px;
  height: auto;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}
.outline-parent-bg {
  width: 456px;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}
.outline {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.outline-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  height: 800px;
  padding: 80px 12px;
  padding-right: 20px;
}
::v-deep .textMore-box {
  padding: 0 24px;
}
.content-tiitle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 432px;
  height: 70px;
  background: rgba(175, 161, 140, 0.1);
  margin-bottom: 18px;
  flex-shrink: 0;
  span {
    font-family: SourceHanSerifCN-Bold;
    font-size: 24px;
    line-height: 36px;
    text-align: center;
    color: rgba(50, 43, 37, 1);
  }
}
.outline-subTitle {
  width: 384px;
  text-align: center;
  font-family: SourceMedium;
  font-size: 18px;
  line-height: 28px;
  text-align: center;
  margin-bottom: 20px;
  color: rgba(50, 43, 37, 1);
}
.outline-remarks {
  width: 384px;
  :deep(.openText) {
    justify-content: center;
    color: rgba(85, 59, 42, 1);
    span {
      color: rgba(85, 59, 42, 1);
    }
  }
  :deep(.text p) {
    color: rgba(50, 43, 37, 1);
  }
  :deep(.omission) {
    color: rgba(50, 43, 37, 1);
  }
}

.outline-cover {
  width: 300px;
  height: 300px;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 30px;
  background: rgba(244, 205, 134, 0.2);
}

.no-remarks {
  width: 384px;
  height: 384px;
  margin-top: 52px;
}
.icon-3d {
  width: 52px;
  height: 64px;
  object-fit: contain;
  position: absolute;
  top: 4px;
  right: 52px;
  z-index: 21;
}
::v-deep .t-popup__content {
  background: #886c56;
  padding: 2px 12px;
  font-family: 'Microsoft YaHei';
  font-size: 13px;
  line-height: 20px;
  color: #fef3df;
  box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
  margin-top: 6px !important;
}
::v-deep .t-popup__arrow::before {
  background: #886c56;
  border: none;
  box-shadow: none !important;
}
</style>